class UsbAccessory {
  final String? uri;
  final String? description;
  final String? manufacturer;
  final String? model;
  final String? serial;
  final String? version;

  UsbAccessory(
      {this.uri,
      this.description,
      this.manufacturer,
      this.model,
      this.serial,
      this.version});

  factory UsbAccessory.fromMap(Map<String, dynamic> map) {
    return UsbAccessory(
      uri: map['uri'] ?? '',
      description: map['description'] ?? '',
      manufacturer: map['manufacturer'] ?? '',
      model: map['model'] ?? '',
      serial: map['serial'] ?? '',
      version: map['version'] ?? '',
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'uri': uri,
      'description': description,
      'manufacturer': manufacturer,
      'model': model,
      'serial': serial,
      'version': version,
    };
  }

  @override
  String toString() => toMap().toString();
}
